/**
 * 
 */
package com.slim.webapp.action;

import org.appfuse.model.NewProjectDetail;
import org.appfuse.model.User;

/**
 * @author happy home
 *
 */
public class ProjectDetailAction extends BaseAction {
	private NewProjectDetail projectDetail;
	private User user;
	
	public String save() {
		String username = this.getRequest().getRemoteUser(); 
		user = userManagerImpl.getUserByUsername(username);
		projectDetail.setUserId(user.getId());
		userManagerImpl.saveNewProjectDetail(projectDetail);
		return SUCCESS;
	}
	

	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/**
	 * @return the projectDetail
	 */
	public NewProjectDetail getProjectDetail() {
		return projectDetail;
	}

	/**
	 * @param projectDetail the projectDetail to set
	 */
	public void setProjectDetail(NewProjectDetail projectDetail) {
		this.projectDetail = projectDetail;
	}

}
